﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <title>@CNKI.TPI.Web.Base.ConfigHelper.GetSiteTitle()</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/js")
    @Styles.Render("~/Content/autocomplete/jquery-ui.css")
    @Scripts.Render("~/Content/jwplayer/jwplayer.js")
    @Scripts.Render("~/Content/jplayer/jquery.jplayer.js")
    @Styles.Render("~/Content/jplayer/skin/blue.monday/css/jplayer.blue.monday.css")
    @using CNKI.TPI.Web.Base;
        <style>
        /*重写提示框样式*/
        .ui-dialog .ui-dialog-titlebar {
            padding: 3px;
        }

        .ui-dialog .ui-dialog-buttonpane {
            margin: 0px;
            padding: 0px;
        }

        .ui-dialog-title {
            padding-left: 5px;
        }
        /*改变标题颜色*/
        .ui-widget-header {
            background-color: #107bce;
            border: 1px solid #107bce;
            background-image: none;
        }

        .ui-front {
            z-index: 999999999;
        }
    </style>
</head>
<body style="position:relative">
    <!--页面头部==开始-->
    <div class="header blue-border">
        <div class="header_t">
            <div class="header_t_in clearfix">
                <div class="gp-n" style="_width: 100px;">
                    <ul class="nav navs01">
                        @*<li><a href="javascript:void(0);" class="no_border no_padding">设为首页</a></li>*@
                    </ul>
                </div>

                <div class="gp-u">
                    @{ 
                        bool anonymousControlFlag = CNKI.TPI.Web.Base.ConfigHelper.IsAnonymousControlEnabled();
                        string anonymousUsername = CNKI.TPI.Web.Base.ConfigHelper.GetAnonymousAccount();
                        string currentUsername = "";
                        if (CNKI.TPI.Web.Base.SessionHelper.IsUserInfoExsit())
                        {
                            currentUsername = CNKI.TPI.Web.Base.SessionHelper.GetUserInfo().UserCode;
                        }
                    }

                    @if (CNKI.TPI.Web.Base.SessionHelper.IsUserInfoExsit() && ((anonymousControlFlag && !anonymousUsername.Equals(currentUsername)) || !anonymousControlFlag))
                    {
                        CNKI.TPI.Web.Search.Model.LoginUserInfo userInfo = CNKI.TPI.Web.Base.SessionHelper.GetUserInfo();
                        string username = string.IsNullOrEmpty(userInfo.UserName) ? userInfo.UserCode : userInfo.UserName;
                        <div class="welcome">@username 您好！</div>
                        <div class="welcome">
                            @if (userInfo.LoginType == 1)
                            {
                                using (Html.BeginForm("LogOffSSO", "Account", FormMethod.Post, new { id = "logoutForm" }))
                                {
                                    @Html.AntiForgeryToken()
                                    <a href="javascript:document.getElementById('logoutForm').submit()">注销</a>
                                }
                            }
                            else
                            {
                                using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
                                {
                                    @Html.AntiForgeryToken()
                                    <a href="javascript:document.getElementById('logoutForm').submit()">注销</a>
                                }
                            }
                        </div>
                    }
                    else
                    {
                        <div class="welcome">
                            @if (ConfigHelper.IsSSOEnabled())
                            {
                                <a href="~/Account/LoginSSO?ReturnUrl=@Uri.EscapeDataString(Request.Url.AbsoluteUri)">登录</a>
                            }
                            else
                            {
                                @Html.ActionLink("登录", "Login", "Account", routeValues: new { ReturnUrl = Request.RawUrl }, htmlAttributes: new { id = "loginLink" })
                            }
                        </div>
                    }
                    <!-- <div class="headerList">
                        <a href="javascript:void(0);" class="nowHoverOn">管理 <i class="iconfont">&#xf000a;</i></a>
                    </div> -->
                    <ul class="nav">
                        @*<li><a class='nav-li1' href="javascript:void(0);" target="_blank">加入收藏</a></li>*@
             @*           <li><a href="javascript:void(0);" target="_blank">系统帮助</a></li>*@
                        <li><a href="~/Admin">登录后台</a></li>
                        @{
                            if (ConfigHelper.IsSSOEnabled() && ((!CNKI.TPI.Web.Base.SessionHelper.IsUserInfoExsit()) || (anonymousControlFlag && anonymousUsername.Equals(currentUsername))))
                            {
                                <li><a href="~/Account/Login?ReturnUrl=@Uri.EscapeDataString(Request.RawUrl)">本地账号登录</a></li>
                            }
                        }
                    </ul>
                </div>
            </div>
        </div>
        <div class="header_b">
            <img src="~/Images/logo185-40.png" alt="logo" />
            @*<div class="logo185-40"></div>*@
            @*<i class="h-line fl"></i>
                 <a href="~/Home"><h1 class='f34 fl'>信息资源建设与管理平台</h1></a>*@
        </div>
    </div>

    <div id="body">
        @RenderSection("featured", required: false)
        <section class="content-wrapper main-content clear-fix">
            @RenderBody()
        </section>
    </div>
    <!--尾部==开始-->
    <div id="bottom">
          @RenderPage("FooterPartial.cshtml")
    </div>
                        <!--透明背景-->
<div class="talkDivBg" style="display: none;z-index:999"></div>

    @*消息提示框*@
    <div id="dialog-message" title="消息提示" >
        <p></p>
    </div>
        @*操作提示框*@
    <div id="dialog-confirm" title="操作提示">
        <p></p>
    </div>
</body>

</html>

